//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    imgeUrl: [
      "/images/swiper/banner_01.jpg",
      "/images/swiper/banner_03.jpg",
      "/images/swiper/banner_04.jpg",
      "/images/swiper/banner_05.jpg",
    ],
    indicatorDots: true,
    vertical: true,
    autoplay: true,
    interval: 2000,
    duration: 500
  },

  onLoad: function () {
    
  },
  //新闻详情页
  taDetali: function(e) {
    let index = e.currentTarget.dataset.index;
    console.log(index);
    wx.navigateTo({
      url: '../index/detali?id=' + index,
    })
  },
  getUserInfo: function(e) {
    console.log(e)
    app.globalData.userInfo = e.detail.userInfo
    this.setData({
      userInfo: e.detail.userInfo,
      hasUserInfo: true
    })
  }
})
